<?php $db = new Mypdo(); ?>
<?php


class Message {

    private $id_msg;
    private $id_propri;
    private $email_expe_msg;
    private $comptenu_msg;


    public function __construct($valeur = array()){
        if(!empty($valeur)){
            $this->affecte($valeur);

        }
    }

    public function affecte($donnees){
        foreach ($donnees as  $attribut => $valeur){
            switch($attribut){
                case 'id_msg': $this->setIdMsg($valeur);
                    break;
                case 'id_propri': $this->setIdPropri($valeur);
                    break;
                case 'email_expe_msg': $this->setEmailExpeMsg($valeur);
                    break;
                case 'comptenu_msg': $this->setComptenuMsg($valeur);
                    break;

            }

        }
    }

    /**
     * @param mixed $comptenu_msg
     */
    public function setComptenuMsg($comptenu_msg)
    {
        $this->comptenu_msg = $comptenu_msg;
    }

    /**
     * @return mixed
     */
    public function getComptenuMsg()
    {
        return $this->comptenu_msg;
    }

    /**
     * @param mixed $email_expe_msg
     */
    public function setEmailExpeMsg($email_expe_msg)
    {
        $this->email_expe_msg = $email_expe_msg;
    }

    /**
     * @return mixed
     */
    public function getEmailExpeMsg()
    {
        return $this->email_expe_msg;
    }

    /**
     * @param mixed $id_msg
     */
    public function setIdMsg($id_msg)
    {
        $this->id_msg = $id_msg;
    }

    /**
     * @return mixed
     */
    public function getIdMsg()
    {
        return $this->id_msg;
    }

    /**
     * @param mixed $id_propri
     */
    public function setIdPropri($id_propri)
    {
        $this->id_propri = $id_propri;
    }

    /**
     * @return mixed
     */
    public function getIdPropri()
    {
        return $this->id_propri;
    }



} 